<?php
if(isset($_POST['submit']))
{
	if($_POST['nutr_desc'] != "" && $_POST['units'] != "")
	{
		$nutr_desc = $_POST['nutr_desc'];
		$units = $_POST['units'];
		
		require_once 'dbOper.php';
		insertNutr ($nutr_desc, $units);
	}
}
?>

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="theme.css">
</head>
<body>
<div id="main">

<form action="<?php $_SERVER['PHP_SELF']?>" method="post">

<input type="text" name="nutr_desc" placeholder="Nutrient name"><br/>
<input type="text" name="units" placeholder="Units of measurement"><br/>
<input type="submit" name="submit" value="Enter nutrient">
</form>
</div>
</body>
</html>